Component({
  data: {
    color: "#515151",
    selectedColor: "#6ca2ff",
    backgroundColor: "#ffffff",
    selected:0,
    list: [
      {
        pagePath: "/pages/index/index",
        text: "门诊",
        iconPath: "/img/tarbar/inquiry.png",
        selectedIconPath: "/img/tarbar/inquiry_select.png"
      },
      {
        pagePath: "/pages/hospitalization/index",
        text: "住院",
        iconPath: "/img/tarbar/hospitalized.png",
        selectedIconPath: "/img/tarbar/hospitalized_select.png"
      },
      {
        bulge:true,
        pagePath: "/pages/record/index",
        iconPath: "/img/tarbar/switch.png",
        selectedIconPath: "/img/tarbar/switch.png"
      },
      {
        pagePath: "/pages/hospital/index",
        text: "医院信息",
        iconPath: "/img/tarbar/hospital.png",
        selectedIconPath: "/img/tarbar/hospital_select.png"
      },
      {
        pagePath: "/pages/personal/index",
        text: " 我家",
        iconPath: "/img/tarbar/personal.png",
        selectedIconPath: "/img/tarbar/personal_select.png"
      }
    ]
  },
  attached() {
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
    //   console.log(data,'eee');
    //   this.setData({
    //     selected:data.index
    //   })
      const url = data.path
      wx.switchTab({url}) 
    }
  }
})